package com.example.venadaoa.datamanager;

import android.app.Activity;

import com.example.venadaoa.R;
import com.example.venadaoa.R.string;

import java.util.ArrayList;

enum MenuType {
    asd, sd, fsd
}

public class MenuManage {
    private Activity context;
    private ArrayList<String> stringArr = new ArrayList<String>();
    //主菜单
    public final static int[] menuId = {R.string.adminstration_office, R.string.work_flow, R.string.system_manage};
    //行政办公菜单
    public final static int[] menu1Id = {R.string.reimburse_apply, R.string.payment_apply, R.string.borrow_apply,
            R.string.purchase_apply, R.string.out_work_apply, R.string.use_seal_apply, R.string.notice, R.string.personal_work_attendance};
    //工作流菜单
    public final static int[] menu2Id = {R.string.task_in_done, R.string.flow_of_reject, R.string.flow_in_done};
    //系统管理菜单或者设置
    public final static int[] menu3Id = {R.string.userinfo, R.string.account_safety, R.string.about};
    //报销管理
    public final static int[] menu4Id = {R.string.reimburse_static, R.string.my_reimburse, R.string.reimburse_in_done, R.string.new_reimburse_apply};
    //付款管理
    public final static int[] menu5Id = {R.string.payment_apply_static, R.string.my_payment_apply, R.string.payment_apply_in_done, R.string.new_payment_apply};
    //借款管理
    public final static int[] menu6Id = {R.string.borrow_apply_static, R.string.my_borrow_apply, R.string.borrow_apply_in_done, R.string.new_borrow_apply};
    //采购管理
    public final static int[] menu7Id = {R.string.purchase_apply_static, R.string.my_purchase_apply, R.string.purchase_apply_in_done, R.string.new_purchase_apply};
    //用章申请
    public final static int[] menu8Id = {R.string.use_seal_apply_record, R.string.use_seal_apply_in_done, R.string.new_use_seal_apply};
    //公告
    public final static int[] menu9Id = {R.string.manage_of_notice, R.string.unread_of_notice, R.string.my_notice};
    //个人考勤
    public final static int[] menu10Id = {R.string.overtime_manage, R.string.out_manage, R.string.leave_manage, R.string.off_manage, R.string.business_travel_manage, R.string.on_duty_registration, R.string.sign_static};
    //加班管理
    public final static int[] menu11Id = {R.string.overtime_apply_static, R.string.my_overtime_apply, R.string.overtime_apply_todo, R.string.create_overtime_apply};
    //外出管理
    public final static int[] menu12Id = {R.string.out_apply_static, R.string.my_out_apply, R.string.out_apply_todo, R.string.create_out_apply};
    //请假管理
    public final static int[] menu13Id = {R.string.leave_apply_static, R.string.my_leave_apply, R.string.leave_apply_todo, R.string.create_leave_apply};
    //调休管理
    public final static int[] menu14Id = {R.string.off_apply_static, R.string.my_off_apply, R.string.off_apply_todo, R.string.create_off_apply};
    //上下班管理
    //public final static int[] menu15Id = {R.string.,R.string.my_overtime_apply,R.string.overtime_apply_todo,R.string.create_overtime_apply};
    //出差管理
    public final static int[] menu16Id = {R.string.business_travel_apply_static, R.string.my_business_travel_apply, R.string.business_travel_apply_todo, R.string.create_business_travel_apply};
    public final static int[] menu17Id = {R.string.out_work_static, R.string.my_out_work, string.out_work_in_done, string.new_out_work_apply};


    private static MenuManage manage;

    public static MenuManage getInstence() {
        if (manage == null) {
            manage = new MenuManage();
        }
        return manage;
    }

    //获取主菜单
    public ArrayList<String> getMainMenu(Activity context, int[] menuId) {
        if (stringArr != null) {
            stringArr.clear();
        }
        this.context = context;
        for (int id : menuId) {
            stringArr.add(getStringById(id));
        }

        return stringArr;
    }

    public String getStringById(int stringId) {
        String string = null;

        string = context.getResources().getString(stringId);

        return string;
    }


}
